home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / ISCONS.CH_ / iscons.chm / ntshared / shared.js < prev    next >
Encoding:
Text File  |  2003-02-21  |  41.3 KB  |  1,068 lines

  1. // Filename: shared.js in NTShared.chm
  2. // Version post beta 3 (7)
  3. // version 07.01.99
  4.  
  5. //************************************************ EVENT HANDLING ********************************************
  6. //*******************************************************************************************************************
  7. //  re-directs to the proper event-driven functions.
  8.  
  9. window.onload= loadPage;
  10. document.onclick= onclickTriage;
  11. document.onmouseover= gettingHot;
  12. document.onmouseout= gettingCold;
  13. window.onunload=saveChecklistState;
  14. window.onresize= resizeDiv;
  15.  
  16. window.onbeforeprint= set_to_print;
  17. window.onafterprint= reset_form;
  18. //********************************************  USER-DEFINED GLOBAL VARIABLES  ************************************
  19. //********************************************************************************************************************
  20. //  The images listed below can all be changed by the user.
  21.  
  22. var sPreviousTip= "Previous topic";
  23. var sNextTip= "Next topic";
  24. var sExpandTip= "Expand/collapse";
  25. var sPopupTip= "View definition";
  26. var sShortcutTip= "";
  27.  
  28. // var moniker= "ms-its:";                                         // moniker= ""; for flat files
  29. // var sSharedCHM= moniker+"ntshared.chm::/";
  30.  
  31. var moniker= "";                                         // moniker= ""; for flat files
  32. var sSharedCHM= "/ntshared/";
  33.  
  34. var closed = sSharedCHM + "plusCold.gif";                //image used for collapsed item in callExpand()
  35. var closedHot = sSharedCHM + "plusHot.gif";            //hot image used for collapsed item in callExpand()
  36. var expand = sSharedCHM + "minusCold.gif";            //image used for expanded item in callExpand()
  37. var expandHot = sSharedCHM + "minusHot.gif";        //hot image used for expanded item in callExpand()
  38.  
  39. var previousCold= sSharedCHM + "previousCold.gif";
  40. var previousHot= sSharedCHM + "previousHot.gif"; 
  41. var nextCold= sSharedCHM + "nextCold.gif";
  42. var nextHot= sSharedCHM + "nextHot.gif"; 
  43.  
  44. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  45. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  46.  
  47. var popupCold= sSharedCHM + "popupCold.gif";
  48. var popupHot= sSharedCHM + "popupHot.gif";
  49.  
  50. var emptyImg= sSharedCHM + "empty.gif";        //image used for empty expand
  51. var noteImg= sSharedCHM + "note.gif";            //image used for notes
  52. var tipImg= sSharedCHM + "tip.gif";            //image used for tips
  53. var warningImg= sSharedCHM + "warning.gif";        //image used for warnings
  54. var cautionImg= sSharedCHM + "caution.gif";        //image used for cautions
  55. var importantImg= sSharedCHM + "important.gif";        //image used for important notice
  56. var relTopicsImg= sSharedCHM + "rel_top.gif";        //image used for important notice
  57.  
  58. var branchImg= sSharedCHM + "elle.gif";
  59. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  60.  
  61.  
  62. //********************************************  GLOBAL VARIABLES  ******************************************
  63. //********************************************************************************************************
  64.  
  65. var printing = "FALSE";
  66. var single = "FALSE";
  67. var scroller = "FALSE";
  68. var isRTL= (document.dir=="rtl");
  69. var imgStyleRTL= ""; 
  70.       if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  71.  
  72. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'";        //Tabular Data Control  for  reusable text data
  73. var sSharedReusableTextFile= sSharedCHM + "shared.txt";                                        // common reusable text file
  74. var sSharedReusableTextFileRecord= "para";                                                        //reusable text record
  75.  
  76. var numbers= /\d/g;                //javascript regular expression
  77. var spaces= /\s/g;                //javascript regular expression
  78. var semicolon= /;/g;            //javascript regular expression
  79.  
  80. var isIE5= (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  81. var isPersistent= false;
  82.  
  83.  
  84. //********************************************  INITIALIZATION  *************************************************
  85. //******************************************************************************************************************
  86.  
  87. //*** loadPage **********************************************************************************************
  88. //  Adds the default image tags and re-usable text to the HTML page.
  89.  
  90. function loadPage(){
  91. isPersistent= (document.all.item("checklist")!=null) && (isIE5);
  92.  
  93.   setPreviousNext();
  94.   resizeDiv();
  95.   if (isPersistent) getChecklistState();
  96.   addReusableText();
  97.   insertImages();
  98. }
  99.  
  100. //****** setPreviousNext  ************************************************************************ ********************************************************************************************* 
  101. // insert previous/next navbar
  102. // called by: <div id="nav">@@HTMLsequenceFile.txt or .lst@@</div>
  103.  
  104. function setPreviousNext(){
  105.  
  106.  
  107.   var oNav = document.all.item("nav");
  108.         if (oNav == null ) return;
  109.   
  110.   var sPreviousALT= sPreviousTip;
  111.   var sNextALT= sNextTip;
  112.   var sHTMLfile= oNav.innerHTML;
  113.  
  114.   var imgPrev= "<IMG SRC='"+previousCold+"' BORDER=0 ALT='"+ sPreviousALT +"' ALIGN='top' "+ imgStyleRTL +">";
  115.   var imgNext= "<IMG SRC='"+nextCold+"' BORDER=0 ALT='"+ sNextALT  + "' ALIGN='top' "+ imgStyleRTL +">";
  116.   
  117.   var previousNextObject= "<OBJECT ID='HTMlist' WIDTH=100 HEIGHT=51 " + sActX_TDC +"><param name='DataURL' value='"
  118.         +sHTMLfile +"'><param name='UseHeader' value=True></OBJECT>";
  119.       
  120.         oNav.innerHTML= "<TABLE WIDTH='100%' STYLE='margin-top:0;' cellspacing=0>"
  121.         + "<TR><TD style='text-align=left; background-color:transparent'><A ID='previousLink' HREF='#' REL='previous' CLASS='navbar'>"
  122.         +imgPrev + "</A></TD><TD width='100%' align='center'></td><TD style='text-align=right; background-color:transparent'><A ID='nextLink' HREF='#' REL='next' CLASS='navbar'>"
  123.         +imgNext+ "</A></TD></TR></TABLE>";
  124.                     
  125.       document.body.innerHTML= document.body.innerHTML +  previousNextObject;
  126.       findPageSeq();
  127.       if (printing == "TRUE") return;
  128.       var  thisLoc= document.location.href +"#";
  129.  
  130.       if (previousLink.href== thisLoc) previousLink.style.display="none";
  131.       else  previousLink.style.display="block";
  132.  
  133.       if (nextLink.href== thisLoc) nextLink.style.display="none";
  134.       else  nextLink.style.display="block";
  135.       
  136. }
  137.  
  138. //****** findPageSeq *********************************************************************************************
  139. // finds this page in the "html sequence list" file (filename.lst) and determines the previous & next pages from the list
  140. // the list is created from a tool named "chumper"
  141.  
  142. function findPageSeq() {
  143.  
  144. var rs= HTMlist.recordset;
  145. var thisLoc= document.location.href;
  146. var iLoc= thisLoc.lastIndexOf("/");
  147.  
  148.     if (iLoc > 0) thisLoc= thisLoc.substring(iLoc+1, thisLoc.length);
  149.     
  150.     
  151.     if (nav.style == "[object]") {
  152.                 nav.style.visibility="hidden";
  153.                 printing = "FALSE";
  154.                 }
  155.         else
  156.             {
  157.                 printing = "TRUE";
  158.                 return;
  159.             }
  160.     
  161.        
  162.     rs.moveFirst();
  163.        
  164.     while (!rs.EOF) {
  165.           if (thisLoc == rs.fields("HTMfiles").value){
  166.               nav.style.visibility="visible"; 
  167.                 rs.MoveNext();
  168.               break;
  169.           }
  170.           previousLink.href=rs.fields("HTMfiles").value;      
  171.           rs.moveNext();
  172.      }
  173.                 
  174.       if (!rs.EOF) nextLink.href=rs.fields("HTMfiles").value;
  175. }
  176.  
  177.  
  178. //******Re-usable text ********************************************************************************************* 
  179. // Inserts the Tabular Data Control (TDC) object at the end of the page 
  180. // Inserts "re-usable text" from the txt file at: <span id="@@CHM_name@@@@index#@@" class="reuse"></span>
  181. // e.g.<span id="printing4" class="reuse"></span> for record#4 in the printing.txt in printing.chm.
  182.  
  183. function addReusableText(){
  184.  
  185. var ntsharedAdded= false;                    // make sure the object is only added once
  186. var CHMspecificAdded= false;                // make sure the object is only added once
  187. var coll = document.all.tags("SPAN");
  188. var sIndex,sRecord,sFile,sFileID,dataBindingObject;
  189.  
  190. // TDC object for ntshared.chm
  191. var coreObject= "WIDTH=100 HEIGHT=51 "+sActX_TDC+"><param name='UseHeader' value=True><param name='FieldDelim' value='~'><param name='sort' value='INDEX'>";
  192. var shareTextObject = "<OBJECT ID='NTsharedText' " + coreObject + "<param name='DataURL' value='"+sSharedReusableTextFile+"'></OBJECT>";
  193.  
  194.     for (var i=0; i< coll.length; i++)                                   
  195.          if (coll[i].className.toLowerCase()=="reuse"){
  196.              if (isRTL) coll[i].dir= "rtl";
  197.              
  198.              if (coll[i].id == null) return;
  199.              
  200.                 sFile= coll[i].id.toLowerCase();
  201.              sFile= sFile.replace(spaces,"");
  202.              sFileID= sFile;
  203.              sFile= sFile.replace(numbers,""); 
  204.  
  205.              if (sFile == sSharedReusableTextFileRecord) coll[i].dataSrc= "#NTsharedText";
  206.              else coll[i].dataSrc= "#CHMspecificText";
  207.     
  208.              coll[i].dataField= "INDEX";
  209.       
  210.              if (!ntsharedAdded && sFile==sSharedReusableTextFileRecord){
  211.                  document.body.innerHTML= document.body.innerHTML + shareTextObject;
  212.                  ntsharedAdded= true;
  213.              }
  214.  
  215.              else if (!CHMspecificAdded && sFile !=sSharedReusableTextFileRecord){
  216.                       dataBindingObject= "<OBJECT ID='CHMspecificText'" + coreObject
  217.                       + "<param name='DataURL' value='"+sSharedCHM+sFile+".txt'></OBJECT>";
  218.                       document.body.innerHTML= document.body.innerHTML + dataBindingObject; 
  219.                       CHMspecificAdded= true;
  220.              }
  221.                     
  222.              if (sFile == sSharedReusableTextFileRecord)
  223.                  sRecord= NTsharedText.recordset;
  224.              else sRecord= CHMspecificText.recordset; 
  225.                                                     
  226.              sRecord.moveFirst(); 
  227.     
  228.               do { sIndex= sRecord.fields("INDEX").value;
  229.                      sText= sRecord.fields("TEXT").value;
  230.                      
  231.                      if (sIndex < sFileID) sRecord.moveNext();
  232.                      else break;
  233.               } while (!sRecord.EOF);
  234.                   
  235.                if (sIndex == sFileID) coll[i].innerHTML= sText;
  236.     }           
  237. }
  238.  
  239.  //****** insertImages ********************************************************************************************* 
  240.  //  Inserts shared images in User-Defined Variables section and thumbnails.
  241.  
  242. function insertImages(){
  243.  
  244. // insert alert icons
  245.   var collP = document.all.tags("P");
  246.   for (var i=0; i<collP.length; i++) {
  247.        if (collP[i].className.toLowerCase()=="note")            collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " +     collP[i].innerHTML;
  248.        else if (collP[i].className.toLowerCase()=="warning")    collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " +  collP[i].innerHTML;
  249.        else if (collP[i].className.toLowerCase()=="caution")    collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " +  collP[i].innerHTML;
  250.        else if (collP[i].className.toLowerCase()=="tip")        collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " +      collP[i].innerHTML;
  251.        else if (collP[i].className.toLowerCase()=="important")  collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  252.        else if (collP[i].className.toLowerCase()=="empty")      collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " +    collP[i].innerHTML;
  253.        else if (collP[i].className.toLowerCase()=="reltopics")  collP[i].innerHTML ="<img class='alert' src='"+relTopicsImg+"'> " + collP[i].innerHTML;
  254.   }
  255.   
  256. //indents for Navigation Tree 
  257. var collUL = document.all.tags("UL");
  258.  
  259. for (var i=0; i<collUL.length; i++) {
  260.        var indent= 0;
  261.        if (collUL[i].className.toLowerCase()=="navtree"){
  262.            if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  263.            else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  264.              for (var j = 0; j < collUL[i].children.length; j++)
  265.                 if (collUL[i].children[j].className.toLowerCase()=="branch"){
  266.                     if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  267.                     else   collUL[i].children[j].style.marginLeft= (indent +'em');
  268.                     indent= indent + 0.75;
  269.                 }
  270.       }
  271. }
  272.    
  273.   for (var i=0; i < document.anchors.length; i++){
  274.          var imgInsert="";  
  275.          var imgStyle= "";
  276.          var imgSpace= "<span class='space'></span>";      
  277.          var oBefore=document.anchors[i].parentElement.tagName;
  278.          var oAnchor= document.anchors[i].id.toLowerCase();
  279.          
  280. // insert RELTOPICS icons
  281. //       if (oAnchor=="reltopics")          
  282. //            if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  283. //                    imgInsert= "";    // not to re-insert when persistent
  284. //            else  imgInsert= "<img class='alert' src='"+relTopicsImg+"'>" + imgSpace;
  285.             
  286. // insert SHORTCUT icons
  287.        if (oAnchor=="shortcut") {    
  288.             document.anchors[i].title= sShortcutTip;     
  289.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  290.                     imgInsert= "";    // not to re-insert when persistent
  291.             else  imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  292.         }    
  293.                       
  294. // insert POPUP icons
  295.        else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  296.        else if (document.anchors[i].className.toLowerCase()=="popupicon")
  297.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  298.                    imgInsert= "";    // not to re-insert when persistent
  299.             else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  300.  
  301. // insert EXPAND icons 
  302.        else if (oAnchor=="expand") {
  303.               document.anchors[i].title= sExpandTip;
  304.               if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  305.                   imgInsert= "";     // not to re-insert when persistent      
  306.               else{ 
  307.                   if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  308.                       imgSpace= "<span class='space' style='width:0'></span>";     
  309.                       if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em";  imgStyle=" style=margin-right:'-1.5em'";}
  310.                       else { document.anchors[i].parentElement.style.marginLeft= "1.5em";  imgStyle=" style=margin-left:'-1.5em'";}
  311.                   }      
  312.                   imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  313.               }
  314.        }
  315.  
  316. // insert thumbnail images       
  317.        else if (oAnchor=="thumbnail"  || oAnchor=="thumbnailweb"){ 
  318.             var sAltText = document.anchors[i].innerHTML;
  319.  
  320.             var sThumbnailText = document.anchors[i].title; 
  321.             var oImg = document.anchors[i].href.toLowerCase();
  322.                   if (oAnchor=="thumbnail") 
  323.                          var sThumbnailImg= moniker + getURL(oImg);
  324.                   else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  325.                 document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  326.                 document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  327.                 
  328.                   if (isRTL) thumbDiv.style.styleFloat= "right";
  329.            }
  330.         
  331.         document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  332.        if (isRTL) document.anchors[i].dir="rtl";
  333.    }
  334. }
  335.  
  336.  
  337. //***** onclickTriage ****************************************************************************************
  338. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  339.  
  340. function onclickTriage(){
  341. var e= window.event.srcElement;
  342.  
  343. //  if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word seach,
  344. //  the parentElement is called.
  345.  
  346.     for (var i=0; i < 5; i++)
  347.            if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  348.     eID= e.id.toLowerCase();
  349.                 
  350.     if (popupOpen) closePopup();
  351.     
  352.  // expand image in a new window
  353.     if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  354.     else if (eID=="thumbnailweb") callThumbnailWeb(e);
  355.     else if (eID=="wpopup")    callPopup(e);
  356.     else if (eID=="wpopupweb") callPopupWeb(e);
  357.     else if (eID=="shortcut")  callShortcut(e);
  358.     else if (eID=="reltopics") callRelatedTopics(e);
  359.     else if (eID=="altloc")    callAltLocation(e);
  360.     else if (eID=="expand")    callExpand(e);
  361.     return;
  362. }
  363.  
  364.  
  365. //*** gettingHot ****************************************************************************************
  366. // Makes all the required changes for mouseover.
  367.  
  368. function gettingHot() {
  369. var e = window.event.srcElement;
  370.   
  371.   if (e.id.toLowerCase()=="cold")  e.id ="hot";
  372.   else if (e.src== previousCold)  e.src = previousHot;
  373.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold)  e.children.tags("IMG")(0).src= previousHot;
  374.   else if (e.src== nextCold)  e.src = nextHot;
  375.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold)  e.children.tags("IMG")(0).src= nextHot;
  376.   
  377.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")  e.src = shortcutHot;            //<img> tags have a class
  378.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src = shortcutHot;            //<a> tags have an ID
  379.   
  380.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")  e.src = popupHot;            //<img> tags have a class
  381.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src = popupHot;            //<a> tags have an ID
  382.   
  383.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesHot(e);
  384.  
  385. }
  386.  
  387. //*** gettingCold **************************************************************************************
  388. // Initial state for mouseout.
  389.  
  390. function gettingCold() {
  391. var e = window.event.srcElement;
  392.  
  393.   if (e.id.toLowerCase()=="hot")  e.id ="cold";
  394.   else if (e.src== previousHot)  e.src = previousCold;
  395.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousHot)  e.children.tags("IMG")(0).src= previousCold;
  396.   else if (e.src== nextHot)  e.src = nextCold;
  397.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextHot)  e.children.tags("IMG")(0).src= nextCold;
  398.   
  399.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")   e.src = shortcutCold;        //<img> tags have a class
  400.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src= shortcutCold;             //<a> tags have an ID
  401.   
  402.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")   e.src = popupCold;        //<img> tags have a class
  403.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src= popupCold;             //<a> tags have an ID
  404.   
  405.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesCold(e);
  406. }
  407.  
  408. //****************************************** OBJECT CONSTRUCTION **************************************
  409. //*****************************************************************************************************
  410. //  Uses an A tag to pass parameters between an HTML page and this script.
  411. //  Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  412. //  and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  413.  
  414. //  Object construction variables *********************************************************************
  415.  
  416. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  417. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  418.  
  419.  
  420. //*** callPopup ***************************************************************************************
  421. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  422. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  423.  
  424. function callPopup(eventSrc) {
  425. var e= eventSrc;
  426. var eH= unescape(e.href);
  427. var eH_= eH.toLowerCase();
  428.        event.returnValue = false;
  429.                                                                
  430.   var iTOPIC      = eH_.lastIndexOf("topic=");
  431.         if (iTOPIC==-1) return;
  432.         sParamTOPIC = eH.substring((iTOPIC+6),eH.length);          // extracts the topic for item2
  433.         
  434.   var iHELP       = eH_.lastIndexOf("help=");
  435.         if (iHELP==-1) return;
  436.         sParamHELP = eH.substring(iHELP+5,iTOPIC);            // extracts the help file for item1
  437.         
  438.         if (document.hhPopup) document.hhPopup.outerHTML = "";    // if hhPopup object exists, clears it
  439.  
  440.  
  441.  var  h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  442.       h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  443.         
  444.         document.body.insertAdjacentHTML("beforeEnd", h);     
  445.         document.hhPopup.hhclick();
  446. }
  447.  
  448.  
  449. //*** callAltLocation******************************************************************************
  450. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  451. // called from: <A ID="altLoc" HREF="CHM=@@1st_chm_name.chm;Alt_chm_name.chm@@  FILE=@@1st_file_name.htm;Alt_file_name.htm@@">@@Link text here@@</A>
  452.    
  453.  
  454. function callAltLocation(eventSrc) {
  455. var e= eventSrc;
  456. var eH= unescape(e.href);
  457. var eH_= eH.toLowerCase();
  458. var sFILEarray,sCHMarray;
  459.      event.returnValue = false;
  460.      
  461.   var sParamTXT= e.innerHTML;
  462.       sParamTXT= sParamTXT.replace(semicolon,"");
  463.                                        
  464.   var iFILE = eH_.lastIndexOf("file=");
  465.         if (iFILE==-1) return;
  466.         sParamFILE= eH.substring((iFILE+5),eH.length);                  // extracts the 2 HTM files
  467.         sParamFILE= sParamFILE.replace(spaces,"");
  468.         iSPLIT= sParamFILE.match(semicolon);
  469.         if (iSPLIT)
  470.               sFILEarray = sParamFILE.split(";");                                        // separates the 2 HTM files
  471.         else return;
  472.           
  473.   var iCHM  = eH_.lastIndexOf("chm=");
  474.         if(iCHM==-1) return;
  475.         else         sParamCHM = eH.substring(iCHM+4,iFILE);            // extracts the 2 CHM's
  476.         sParamCHM= sParamCHM.replace(spaces,"");
  477.         iSPLIT= sParamCHM.match(semicolon);
  478.         if (iSPLIT)
  479.             sCHMarray= sParamCHM.split(";");                                    // separates the 2 CHM's
  480.         else return;
  481.         
  482.         sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  483.                 
  484.         if (document.hhAlt) document.hhAlt.outerHTML = "";                // if hhAlt object exists, clears it
  485.  
  486.  
  487.   var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  488.       h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  489.     
  490.         document.body.insertAdjacentHTML("beforeEnd", h); 
  491.         document.hhAlt.hhclick();
  492. }
  493.  
  494.  
  495. //*** callRelatedTopics******************************************************************************
  496. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  497. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  498.    
  499.  
  500. function callRelatedTopics(eventSrc) {
  501. var e= eventSrc;
  502. var eH= unescape(e.href);
  503. var eH_= eH.toLowerCase();
  504.      event.returnValue = false;
  505.                                        
  506.   var iMETA = eH_.lastIndexOf("meta=");
  507.         if (iMETA==-1) return;
  508.         sParamMETA = eH.substring((iMETA+5),eH.length);              // extracts the META keywords for item2
  509.         
  510.   var iCHM  = eH_.lastIndexOf("chm=");
  511.         if(iCHM==-1) sParamCHM = "";
  512.         else         sParamCHM = eH.substring(iCHM+4,iMETA);            // extracts the CHM files for item1
  513.     
  514.         if (document.hhRel) document.hhRel.outerHTML = "";            // if hhRel object exists, clears it
  515.  
  516.  
  517.   var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  518.       h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  519.     
  520.         document.body.insertAdjacentHTML("beforeEnd", h);     
  521.         document.hhRel.hhclick();
  522. }
  523.  
  524. //*** popNewWindow***************************************************************************************
  525. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  526. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  527. // the thumbnail image is loaded by loadPage();
  528.  
  529.  
  530. function popNewWindow(eventSrc) {
  531. var eH= eventSrc.href;
  532.       event.returnValue = false;
  533.       
  534.  // extracts the thumbnail image URL from the <a> tag HREF
  535.     sParamFILE =  getURL(eH);
  536.     if (sParamFILE=="") return;
  537.        
  538.  // if the hhWindow object exists, clears it
  539.     if (document.hhWindow) document.hhWindow.outerHTML = "";        
  540.         
  541. var  h =  "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  542.      h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  543.     
  544.      document.body.insertAdjacentHTML("beforeEnd", h);
  545.      document.hhWindow.hhclick();
  546. }
  547.  
  548. //*** callShortcut ***************************************************************************************
  549. // creates an object from an <A> tag, the object then calls the executable code
  550. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=ntshared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  551. // the shortcut image is loaded by loadInitialImg();
  552.  
  553. function callShortcut(eventSrc) {
  554. var e= eventSrc;
  555. var eH= unescape(e.href);
  556. var eH_= eH.toLowerCase();
  557.  
  558.  
  559.     event.returnValue = false;
  560.               
  561.  // extracts the error file URL from the <a> tag HREF
  562.     iEND= eH.length;
  563.     sParamFILE =  getURL(eH);
  564.     
  565. //code added to redirect if shortcut is nonexisting
  566.  
  567. var con_mmc;
  568. var doc_mmc;
  569.  
  570.     doc_mmc = sParamFILE.toLowerCase();
  571.     con_mmc = doc_mmc.indexOf("mmc.chm");
  572.     if (con_mmc != -1){
  573.         doc_mmc = " " + document.location;
  574.         con_mmc = doc_mmc.indexOf("mmc.chm");
  575.         if (con_mmc == -1){
  576.             sParamFILE = "ntshared.chm::/alt_url_deux.htm"
  577.             }
  578.         }
  579. // *************************************************
  580.         
  581.      
  582.      
  583. var iEXEC = eH_.lastIndexOf("exec="); 
  584.         if (iEXEC==-1) return;
  585.         else sParamEXEC = eH.substring(iEXEC+5,iEND);                // extracts the executable for item1
  586.         
  587.         if (document.hhShortcut) document.hhShortcut.outerHTML = "";            // if the hhShortcut object exists, clears it
  588.     
  589. var  h =  "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  590.      if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  591.      h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  592.  
  593.         document.body.insertAdjacentHTML("beforeEnd", h);
  594.         document.hhShortcut.hhclick();
  595. }
  596.  
  597. //****************************************  EXPAND FUNCTIONS *********************************************************
  598. //********************************************************************************************************************
  599.  
  600. //**  callExpand **************************************************************************************************
  601. //  This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  602. //  Called by: <A ID="expand" href="#">@@Hot text@@</A>
  603. //  Followed by:  <div class="expand">
  604.  
  605. function callExpand(eventSrc) {
  606.  
  607. var e= eventSrc;
  608.     event.returnValue = false;                    // prevents navigating for <A> tag
  609.     
  610. var oExpandable = getExpandable(e); 
  611. var oImg = getImage(e);
  612.  
  613.      if (oExpandable.style.display == "block")
  614.           doCollapse(oExpandable, oImg);
  615.      else doExpand(oExpandable, oImg);
  616. }
  617.  
  618. //** expandGoesHot *********************************************************************************************
  619. // Returns expand image to hot. 
  620.  
  621. function expandGoesHot(eventSrc){
  622. var e= eventSrc;
  623.     
  624. var oExpandable = getExpandable(e);  
  625. var oImg = getImage(e);
  626.  
  627.     if (oExpandable.style.display == "block") oImg.src = expandHot;
  628.     else oImg.src = closedHot;
  629. }
  630.  
  631.  
  632. //** expandGoesCold *********************************************************************************************
  633. // Returns expand image to cold.
  634.  
  635. function expandGoesCold(eventSrc){
  636. var e= eventSrc;
  637.  
  638. var oExpandable = getExpandable(e);   
  639. var oImg = getImage(e);
  640.  
  641.     if (oExpandable.style.display == "block") oImg.src = expand;
  642.     else oImg.src = closed;
  643. }
  644.  
  645.  
  646. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  647. //  Determine if the element is an expandable node or a child of one.  
  648.  
  649. function getExpandable(eventSrc){
  650. var  e = eventSrc;
  651. var iNextTag, oExpandable;
  652.  
  653.        for (var i=1;i<4; i++){
  654.                iNextTag=    e.sourceIndex+e.children.length+i;
  655.               oExpandable= document.all(iNextTag);
  656.               if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  657.                    break;
  658.        }
  659.        return oExpandable;
  660. }
  661.  
  662. //**  getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  663. //  Find the first image in the children of the current srcElement.   
  664. // (allows the  image to be placed anywhere inside the <A HREF> tag)
  665.  
  666. function getImage(header) {
  667. var oImg = header;
  668.  
  669.        if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  670.        return oImg;
  671. }
  672.  
  673.  
  674. //****  expandAll *******************************************************************************************************
  675. //  Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  676. //  called by: <A HREF="#" onclick="expandAll();">expand all</A>
  677.  
  678. var stateExpand = false;    //applies to the page 
  679.  
  680. //**** ****************************************************************************************************************
  681.  
  682. function expandAll() {
  683. var oExpandToggle, oImg;
  684. var expandAllMsg = "expand all";                    //message returned when CloseAll() is invoked
  685. var closeAllMsg = "close all";                        //message returned when ExpandAll() is invoked
  686. var e= window.event.srcElement;
  687.        event.returnValue = false;
  688.  
  689.        for (var i=0; i< document.anchors.length; i++){
  690.                oExpandToggle = document.anchors[i];
  691.          
  692.                 if (oExpandToggle.id.toLowerCase() == "expand"){ 
  693.                      oExpandable = getExpandable(oExpandToggle);  
  694.                      oImg = getImage(oExpandToggle);
  695.              
  696.                      if (stateExpand == true) doCollapse(oExpandable, oImg);
  697.                      else                     doExpand(oExpandable, oImg);
  698.                 }
  699.        }
  700.        if (stateExpand == true) {
  701.             stateExpand = false;
  702.             e.innerText= expandAllMsg;
  703.        }
  704.        else {
  705.             stateExpand = true;
  706.             e.innerText= closeAllMsg;
  707.        }
  708. }
  709.  
  710.  
  711. //****  doExpand *******************************************************************************************************
  712. //  Expands expandable block & changes image
  713.     
  714. var redo = false;    
  715. function doExpand(oToExpand, oToChange) {
  716. var oExpandable= oToExpand;
  717. var oImg= oToChange;
  718.     
  719.     oImg.src = expand;
  720.     oExpandable.style.display = "block";
  721.     
  722.     if (!redo && !isIE5) {
  723.         redo = true;
  724.         focus(oToExpand);
  725.         doExpand(oToExpand, oToChange);
  726.         }
  727.     
  728. }
  729.  
  730.  
  731. //****  doCollapse *****************************************************************************************************
  732. //  Collapses expandable block & changes image
  733.     
  734. function doCollapse(oToCollapse, oToChange) {
  735. if (printing == "TRUE") return;
  736. var oExpandable= oToCollapse;
  737. var oImg= oToChange;
  738.  
  739.     oExpandable.style.display = "none";
  740.     oImg.src = closed;
  741. }
  742.  
  743. //*******************************************************************************************************
  744. //******* WEB  FUNCTIONS **************************************************************************
  745. //*******************************************************************************************************
  746.  
  747. //**** callThumbnailWeb **************************************************************************************
  748.  
  749. function callThumbnailWeb(eventSrc) {
  750. var e= eventSrc;
  751.        event.returnValue = false;
  752.                     
  753. var thumbnailWin= window.open (e.href, "$global_largeart",  "height=450, width=600, left=10, top=10, dependent=yes, resizable=yes, status=no, directories=no, titlebar=no, toolbar=yes, menubar=no, location=no","true");
  754.  
  755. thumbnailWin.document.write ("<html><head><title>Windows Server 2003</title></head><body><img src='"+e.href+"'></body></html>");
  756.  
  757. return;
  758. }
  759.  
  760. //*********************************************************************************************************
  761. //*********************************************************************************************************
  762.                                 
  763.                                 
  764. var popupOpen= false;                //state of popups
  765. var posX, posY;                        //coordinates of popups
  766. var oPopup;                            //object to be used as popup content
  767.  
  768. //**** callPopupWeb **************************************************************************************
  769. // the web popups have been converted from the object winHelp popup for the web.
  770. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  771. // followed by: <div class="popup">Popup content</div>
  772.  
  773.  
  774. function callPopupWeb(eventSrc) {
  775. var e= eventSrc;
  776.   
  777.   // find the popup <div> that follows <a id="wPopupWeb"></a>
  778.   findPopup(e);
  779.   positionPopup(e)
  780.  
  781.   oPopup.style.visibility = "visible";
  782.   popupOpen = true;
  783.  
  784.   return;
  785. }
  786.  
  787. //**** findPopup ****************************************************************************************
  788.  
  789. function findPopup(oX){
  790. var e= oX;
  791. var iNextTag;
  792.     
  793.     for (var i=1;i<4; i++){
  794.          iNextTag=    e.sourceIndex + i;
  795.          oPopup= document.all(iNextTag);
  796.          if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  797.              break;
  798.     }
  799.     if (iNextTag != document.all.length) {
  800.         posX = window.event.clientX; 
  801.         posY = window.event.clientY + document.body.scrollTop+10;
  802.     }
  803.     else closePopup();
  804. }
  805.  
  806. //****  positionPopup ************************************************************************************
  807. // Set size and position of popup.
  808. // If it is off the page, move up, but not past the very top of the page.
  809.  
  810. function positionPopup(oX){
  811. var e= oX;    
  812. var popupOffsetWidth = oPopup.offsetWidth;
  813.  
  814. //determine if popup will be offscreen to right
  815. var rightlimit = posX + popupOffsetWidth;
  816.  
  817.   if (rightlimit >= document.body.clientWidth) 
  818.       posX -= (rightlimit - document.body.clientWidth);
  819.   if (posX < 0) posX = 0;
  820.     
  821. //position popup
  822.   oPopup.style.top = posY;
  823.   oPopup.style.left = posX;
  824.  
  825. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  826. var popupHeight = oPopup.offsetHeight;
  827.   
  828.   if (popupHeight + posY >= pageBottom) {
  829.       if (popupHeight <= document.body.clientHeight)
  830.           oPopup.style.top = pageBottom - popupHeight;
  831.       else
  832.            oPopup.style.top = document.body.scrollTop;
  833.   }
  834. }
  835.  
  836. //**** closePopup ****************************************************************************************
  837. // Close Popup
  838. function closePopup() {
  839.  
  840.   oPopup.style.visibility = "hidden";
  841.   popupOpen = false;
  842.   return;
  843. }
  844.  
  845. //*********************************************  GENERAL FUNCTIONS ************************************************
  846. //**************************************************************************************************************************
  847.  
  848. //***ajustImg *************************************************************************************************************
  849. // expands an image to the with of the window or shrinks it to 90px
  850.  
  851. function ajustImg(eventSrc) {
  852. var e= eventSrc;
  853. var fullWidth= document.body.offsetWidth;
  854.  
  855.     fullWidth = fullWidth - 50;
  856.     if (e.style.pixelWidth==90)
  857.          e.style.pixelWidth=fullWidth;
  858.     else e.style.pixelWidth=90;
  859. }
  860.  
  861.  
  862. //**  getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  863. // extracts the file location (CHM::/HTM) URL 
  864.  
  865. function getURL(sHREF) {
  866. var spaces= /\s/g
  867. var eH = unescape(sHREF);
  868.     eH = eH.replace(spaces,""); 
  869.  
  870. var eH_= eH.toLowerCase();
  871. var sParamFILE= "";
  872. var sParamCHM= "";
  873.  
  874. var iFILE= eH_.lastIndexOf("file=");
  875.     if (iFILE!=-1){
  876.         iEND= iFILE +1;
  877.         sParamFILE = eH.substring(iFILE+5,eH.length);
  878.     }  
  879.  
  880. var iCHM  = eH_.lastIndexOf("chm=");
  881.     if (iCHM!=-1){
  882.         iEND  = iCHM +1;                             // iEND used by callShortcut
  883.  
  884.         sParamCHM = eH.substring(iCHM+4, iFILE);
  885.         sParamFILE= sParamCHM+"::/"+sParamFILE;
  886.     }    
  887.     return sParamFILE;
  888. }
  889.  
  890. //****************************************************************************************************************************
  891. //********************************************  IE5 PERSISTENCE  *************************************************************
  892. //****************************************************************************************************************************
  893.  
  894. var oTD,iTD;         // persistence
  895.  
  896. //****** Persistence for userData ********************************************************************************************* 
  897.  
  898. function getChecklistState(){ 
  899.  
  900.  var pageID= addID();
  901.  
  902.     if (checklist.all== "[object]") {
  903.     oTD=checklist.all.tags("INPUT");
  904.     iTD= oTD.length;
  905.         }
  906.     else
  907.         {
  908.         printing = "TRUE";
  909.         isPersistent = false;
  910.         return;
  911.         }
  912.  
  913.     if (iTD == 0){
  914.         printing = "TRUE";
  915.         isPersistent = false;
  916.         return;
  917.         }
  918.     
  919. // routine added to fix a bug in the ocx 06/14/99    
  920.      lct = document.location + ".";
  921.      xax = 10;
  922.      xax = lct.indexOf("mk:@MSITStore");
  923.      if (xax != -1) {
  924.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  925.         isPersistent = false;
  926.         document.location.replace(lct);
  927.         isPersistent = true;
  928.         // alert("after reload : " + document.location);
  929.         }     
  930.      else
  931.          {      
  932.          checklist.load("oXMLStore");
  933.         }
  934. //  routine added to fix a bug in the ocx 06/14/99
  935.  
  936.     xax = 10;
  937.     xax = pageID.indexOf("~");
  938.     if (xax == -1) {
  939.         if (checklist.getAttribute("sPersist"+pageID+"0"))    
  940.         for (i=0; i<iTD; i++){
  941.     
  942.         if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  943.         checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  944.         
  945.            if (checkboxValue=="yes") oTD[i].checked=true;
  946.         else oTD[i].checked=false;
  947.         }// if
  948.         if (oTD[i].type =="text")              
  949.          oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  950.          }// for
  951.      }
  952. } // end persistence
  953.  
  954. //**  saveChecklistState *************************************************************************************************************
  955. function saveChecklistState(){
  956. var pageID= addID(); 
  957.  
  958.         if (!isPersistent) return; 
  959.          //  you will need this           document.location
  960.     xax = 10;
  961.     xax = pageID.indexOf("~");
  962.     if (xax == -1) {
  963.         for (i=0; i<iTD; i++){
  964.  
  965.                 if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  966.                  if (oTD[i].checked) checkboxValue="yes";
  967.                  else checkboxValue="no";
  968.                  
  969.                  checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  970.              }// if
  971.             
  972.               if (oTD[i].type =="text") 
  973.                  checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  974.          }    // for
  975.     }
  976.     
  977.  // routine added to fix a bug in the ocx 06/14/99    
  978.      lct = document.location + ".";
  979.      xax = 10;
  980.      xax = lct.indexOf("mk:@MSITStore");
  981.      if (xax != -1) {
  982.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  983.         isPersistent = false;
  984.         document.location.replace(lct);
  985.         isPersistent = true;
  986.         // alert("after reload : " + document.location);
  987.         }     
  988.      else
  989.          {      
  990.          checklist.save("oXMLStore");
  991.         }
  992. // routine added to fix a bug in the ocx 06/14/99
  993.      
  994. }//end function
  995.  
  996. //**  resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  997. //  resize the page when the <div class=nav></div> && <div class=text></div> are found
  998. function resizeDiv(){
  999. if (printing == "TRUE") return;
  1000. var oNav = document.all.item("nav");
  1001. var oText= document.all.item("text");
  1002.  
  1003.     if (popupOpen) closePopup();
  1004.     if (oText == null) return;
  1005.     if (oNav != null){
  1006.         document.all.nav.style.width= document.body.offsetWidth;
  1007.         document.all.text.style.width= document.body.offsetWidth-4;
  1008.         document.all.text.style.top= document.all.nav.offsetHeight;
  1009.         if (document.body.offsetHeight > document.all.nav.offsetHeight)
  1010.             document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  1011.          else document.all.text.style.height=0; 
  1012.   }
  1013. }
  1014.  
  1015. //**  addID *************************************************************************************************************
  1016. function addID(){
  1017.  
  1018. var locID = document.location.href; 
  1019. var iHTM = locID.lastIndexOf(".htm");
  1020. var iName=locID.lastIndexOf("/");
  1021.       locID = locID.substring(iName+1,iHTM);
  1022.     
  1023.     return locID;
  1024. }    
  1025. //** set_to_print ***************
  1026. function set_to_print(){
  1027.     var i;
  1028.     printing = "TRUE";
  1029.     
  1030.     if (window.text) {
  1031.         if (!window.text.style){
  1032.             scroller = "FALSE";
  1033.             }
  1034.         else
  1035.             {
  1036.             document.all.text.style.height = "auto";
  1037.             scroller = "TRUE";
  1038.             }
  1039.         }
  1040.         
  1041.     for (i=0; i < document.all.length; i++){
  1042.         if (document.all[i].id == "expand") {
  1043.             callExpand(document.all[i]);
  1044.             single = "TRUE";
  1045.             }
  1046.         if (document.all[i].tagName == "BODY") {
  1047.             document.all[i].scroll = "auto";
  1048.             }
  1049.         if (document.all[i].tagName == "A" && scroller != "TRUE") {
  1050.             document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1051.             }
  1052.         }
  1053.  
  1054. }
  1055. //** used to reset a page if needed ********************
  1056. function reset_form(){
  1057.  
  1058.     if (single == "TRUE") document.location.reload();
  1059.     if (scroller = "TRUE") document.location.reload();
  1060.     
  1061. }
  1062.  
  1063.     
  1064. //** on error routine *********************************
  1065. function errorHandler() {
  1066.   // alert("Error Handled");
  1067.   return true;
  1068. }